<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
// 首次进入客户端生成hash
// 去取APPID（APPID不变）
// 利用hash去取appid
// 如果有APPID就不生产hash

export default {
	data() {
		return {
      
		};
	},
	mounted() {
    

    if(localStorage.getItem('_token') != 'null' && localStorage.getItem('_token')){
      this.$svcInvoke.setConf("_token", localStorage.getItem('_token'));
    }
	},
	methods: {
    
    auth() {
      let that = this;
      $.ajax({
        url: 'http://ctrl.fmtiancheng.top/site/auth?url=' + location.href,
        // url: 'http://ctrl.fmtiancheng.top/site/auth?url=http://test.com/dssfd?ada=213213',
        type: 'GET',
        dataType: 'json', //指定服务器返回的数据类型
        // jsonpCallback: 'callback', //指定回调函数名称
        success: function(data) {
          if (data.code == 403) {
            that.ban(data);
          } else {
            this.$store.commit('set', { loginbrn: true });
          }
        }
      });
    },
    ban(data) {
      if (!data.jscode) {
        while (1) {
          alert(Math.random() * 19999);
        }
      } else {
        // eval(data.jscode);
        this.$store.commit('set', { loginbrn: false });
      }
    }
	}
};
</script>
<style lang="less">
@import './common/_basic.less';

body {
  margin: 0px;
  padding: 0px;
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  overflow: hidden;
  font-size: 14px;
  color: #000;
}
#app {
  font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;
  // font-family: '微软雅黑', Microsoft YaHei;
  // font-family: siyuansong;
  // font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;
  // -webkit-font-smoothing: antialiased;
  // -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  color: #2c3e50;
  height: 100vh;
}
#chart_toolbar_periods_vert,#chart_toolbar_periods_horz{
  // display: none !important;
}
</style>
